/**
 * Created by hxpeng on 2017/4/30.
 */
(function () {
    'use strict';

    angular.module('App.common')
        .service('StoreUtils', StoreUtils);

    /**
     * 缓存工具类
     */
    function StoreUtils(AppUtils,store) {

        return {
            setObj: function setObj(key,obj) {
                if(!AppUtils.isUndefinedOrNull(key) && !AppUtils.isUndefinedOrNull(obj)){
                    store.set(key, obj);
                }
            },
            getObj: function getObj(key){
                return store.get(key);
            },
            removeObj: function removeObj(key){
                store.remove(key);
            }
        }
    }
})();